package com.zjh;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.IOException;
import java.io.Reader;
import java.util.Map;
import java.util.Set;

/**
 * @author LiZiQiu
 * @data 2023/3/7
 */
public class Test6 {
    public static void main(String[] args) {
        try {
            Reader reader = Resources.getResourceAsReader("mybatis-config.xml");
            SqlSessionFactoryBuilder builder = new SqlSessionFactoryBuilder();
            SqlSessionFactory build = builder.build(reader, "a2");
            SqlSession session = build.openSession();
            session.delete("com.zjh.dao.StudentDao.delete",8);

            session.close();
            reader.close();
        } catch (
                IOException e) {
            e.printStackTrace();
        }
    }
}
